<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"
      xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>房屋信息列表</title>
    <link th:replace="common/header"/>
    <link rel="stylesheet" th:href="@{/css/tip.css}"/>
    <script type="text/javascript" th:src="@{/js/androidwheel/androidwheel.js}"></script>
    <script type="text/javascript" th:src="@{/js/layer/tip.js}"></script>
</head>
<body class="no-skin">
<div th:replace="common/top"/>
<div class="main-container ace-save-state" id="main-container">
    <div th:replace="common/menu"/>
    <div class="main-content">
        <div class="main-content-inner">
            <div th:replace="common/title"/>
            <div class="page-content">
                <div th:replace="common/skin"/>
                <div class="row">
                    <div class="col-xs-12">
                        <!-- PAGE CONTENT BEGINS -->
                        <h3 class="header smaller lighter blue"><i class="fa fa-list" aria-hidden="true"></i>房屋信息列表</h3>
                        <form id="form" name="form" th:action="@{/houseStatus/getAll}" th:method="post"
                              th:object="${houseStatusForm}">
                            <input type="hidden" id="ownerId" name="ownerId" th:value="*{ownerId}"/>
                            <div class="row-fluid">
                                <!--PAGE CONTENT BEGINS HERE-->
                                <div class="span2">
                                    <a shiro:hasPermission="/houseStatus/add" class="btn btn-info"
                                       th:href="@{/houseStatus/add}"><i class="fa fa-plus"
                                                                        aria-hidden="true"></i>添加</a>
                                    <button shiro:hasPermission="/houseStatus/deleteAll" type="button"
                                            class="btn btn-danger"
                                            th:onclick="'deleteAll(\'/houseStatus/deleteAll\');'"><i
                                            class="fa fa-times" aria-hidden="true"></i>删除
                                    </button>
                                    <a class="btn btn-info" th:unless="*{ownerId eq null}"
                                       th:href="@{/propertyOwnershipCertificate/getAll}"><i
                                            class="fa fa-plus" aria-hidden="true"></i>返回</a>
                                </div>
                                <div class="span2">
                                    <div class="row-fluid">
                                        <div class="span4">
                                            <span class="input_text">关键字:</span>
                                        </div>
                                        <div class="span8">
                                            <input type="text" name="key" id="key" class="input_fix"
                                                   placeholder="关键字" th:value="*{key}" maxlength="100"/>
                                        </div>
                                    </div>
                                </div>
                                <div class="span3">
                                    <div class="row-fluid">
                                        <div class="span4">
                                            <span class="input_text">建筑/使用面积:</span>
                                        </div>
                                        <div class="span8">
                                            <select th:field="*{coveredArea}" id="coveredArea" name="coveredArea"
                                                    class="input_fix">
                                                <option value="">全部</option>
                                                <option value="1">小于50平方米</option>
                                                <option value="2">50平方米-65平方米</option>
                                                <option value="3">65平方米-75平方米</option>
                                                <option value="4">75平方米-100平方米</option>
                                                <option value="5">大于100平方米</option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                                <div class="span2">
                                    <div class="row-fluid">
                                        <div class="span4">
                                            <span class="input_text">房屋结构:</span>
                                        </div>
                                        <div class="span8">
                                            <select th:field="*{structure}" id="structure" name="structure"
                                                    class="input_fix">
                                                <option value="">全部</option>
                                                <option th:each="structure : ${T(xyz.ibenben.zhongdian.system.entity.enums.HouseStructureEnum).values()}"
                                                        th:value="${structure}"
                                                        th:text="${structure.text}"></option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                                <div class="span2">
                                    <div class="row-fluid">
                                        <div class="span4">
                                            <span class="input_text">房屋类型:</span>
                                        </div>
                                        <div class="span8">
                                            <select th:field="*{type}" id="type" name="type" class="input_fix">
                                                <option value="">全部</option>
                                                <option th:each="type : ${T(xyz.ibenben.zhongdian.system.entity.enums.StatusTypeEnum).values()}"
                                                        th:value="${type}" th:text="${type.text}"></option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                                <div class="span1">
                                    <button class="btn btn-info" style="float: right;" type="button"
                                            onclick="pagechange(1);"><i class="fa fa-search"
                                                                        aria-hidden="true"></i>查询
                                    </button>
                                </div>
                            </div>
                            <table class="table">
                                <thead>
                                <tr>
                                    <td class="center" style="width:80px;"><label><a href="javascript:void(0);"
                                                                                     th:onclick="'selectAll(this)'">全/不选</a></label>
                                    </td>
                                    <td>幢号</td>
                                    <td class="hidden-480">房号</td>
                                    <td class="hidden-480">房屋结构</td>
                                    <td class="hidden-480">设计用途</td>
                                    <td class="hidden-480">所在层数/房屋总层数</td>
                                    <td class="hidden-480">房屋类型</td>
                                    <td class="hidden-480">建筑面积</td>
                                    <td class="hidden-480">使用面积</td>
                                    <td>操作</td>
                                </tr>
                                </thead>
                                <tbody>
                                <tr th:each="house: ${pi.records}">
                                    <td class="center"><label><input type="checkbox" name="selectIds"
                                                                     th:value="${house.id}"/><span
                                            class="lbl">&nbsp;</span></label></td>
                                    <td th:text="${house.hitNumber}"></td>
                                    <td class="hidden-480" th:text="${house.roomNumber}">doudou</td>
                                    <td class="hidden-480" th:text="${house.structure.text}">1-1-1-1</td>
                                    <td class="hidden-480" th:text="${house.designPurpose}">南</td>
                                    <td class="hidden-480"
                                        th:text="${house.houseInLayer} + '层/' + ${house.houseTotalLayer} + '层'">15/32
                                    </td>
                                    <td class="hidden-480" th:text="${house.type.text}">海尔家园</td>
                                    <td class="hidden-480"
                                        th:text="${#numbers.formatDecimal(house.coveredArea, 1, 2) + '平方米'}">海尔路9号102户
                                    </td>
                                    <td class="hidden-480"
                                        th:text="${#numbers.formatDecimal(house.useableArea, 1, 2) + '平方米'}">商用
                                    </td>
                                    <td>
                                        <a shiro:hasPermission="/houseStatus/edit" href="#"
                                           class="btn btn-warning btn-minier"
                                           th:href="@{'/houseStatus/edit?id=' + ${house.id}}" th:text="修改">修改</a>
                                        <a shiro:hasPermission="/houseStatus/delete" href="#"
                                           class="btn btn-danger btn-minier"
                                           th:href="@{'/houseStatus/delete?id=' + ${house.id}}" th:text="删除">删除</a>
                                        <a shiro:hasPermission="/houseStatus/view" href="#"
                                           class="btn btn-primary btn-minier"
                                           th:href="@{'/houseStatus/view?id=' + ${house.id}}" th:text="查看详情">查看详情</a>
                                    </td>
                                </tr>
                                </tbody>
                                <tfoot>
                                <tr>
                                    <td colspan="10">
                                        <div class="row-fluid" th:replace="common/page"/>
                                    </td>
                                </tr>
                                </tfoot>
                            </table>
                        </form>
                        <!-- PAGE CONTENT ENDS -->
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->
    <div th:replace="common/footer"/>
</div><!-- /.main-container -->
<div th:replace="common/buttom"/>
<div th:replace="common/layer"/>

</body>
</html>
